{{!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
}}

{{view view.dashboardMasterComponentView}}
<!-- Data Nodes -->
<tr>
  <td class="summary-label"><a
          href="#" {{action filterHosts view.dataNodeComponent}}>{{t dashboard.services.hdfs.datanodes}}</a></td>
  <td>
    {{#if App.router.clusterController.isServiceContentFullyLoaded}}
      <span>
        {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.dataNodesStarted" totalComponentsBinding="view.service.dataNodesTotal"}}
          {{view.liveComponents}}/{{view.totalComponents}}
        {{/view}}
      </span>
      {{t common.started}}
    {{else}}
      {{t common.loading.eclipses}}
    {{/if}}
  </td>
</tr>
<!-- Data Node Counts -->
<tr>
  <td class="summary-label">{{t dashboard.services.hdfs.datanodecounts}}</td>
  {{#if view.service.metricsNotAvailable}}
    <td>{{t services.service.summary.notAvailable}}</td>
  {{else}}
    <td>
      <span {{translateAttr data-original-title="dashboard.services.hdfs.datanode.status.tooltip.live" }}
              rel="tooltip">{{view.service.liveDataNodes.length}} {{t dashboard.services.hdfs.nodes.live}} </span> /
      <span {{translateAttr data-original-title="dashboard.services.hdfs.datanode.status.tooltip.dead" }}
              rel="tooltip">{{view.service.deadDataNodes.length}} {{t dashboard.services.hdfs.nodes.dead}} </span> /
      <span {{translateAttr data-original-title="dashboard.services.hdfs.datanode.status.tooltip.decommission" }}
              rel="tooltip">{{view.service.decommissionDataNodes.length}} {{t dashboard.services.hdfs.nodes.decom}}</span>
    </td>
  {{/if}}
</tr>
<!-- JournalNodes -->
{{#if view.showJournalNodes}}
  <tr>
    <td class="summary-label"><a
            href="#" {{action filterHosts view.journalNodeComponent}}>{{t dashboard.services.hdfs.journalnodes}}</a>
    </td>
    <td>
      {{#if App.router.clusterController.isComponentsStateLoaded}}
        <span>
          {{#view App.ComponentLiveTextView liveComponentsBinding="view.journalNodesLive" totalComponentsBinding="view.journalNodesTotal"}}
            {{view.liveComponents}}/{{view.totalComponents}}
          {{/view}}
        </span>
        {{t services.service.summary.JournalNodesLive}}
      {{else}}
        {{t common.loading.eclipses}}
      {{/if}}
    </td>
  </tr>
{{/if}}
<!-- NFS Gateway -->
{{#if view.isNfsInStack}}
  <tr>
    <td class="summary-label"><a
            href="#" {{action filterHosts view.nfsGatewayComponent}}>{{t dashboard.services.hdfs.nfsgateways}}</a></td>
    <td>
      {{#if App.router.clusterController.isServiceContentFullyLoaded}}
        <span>
          {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.nfsGatewaysStarted" totalComponentsBinding="view.service.nfsGatewaysTotal"}}
            {{view.liveComponents}}/{{view.totalComponents}}
          {{/view}}
        </span>
        {{t common.started}}
      {{else}}
        {{t common.loading.eclipses}}
      {{/if}}
    </td>
  </tr>
{{/if}}
<!-- NameNode Uptime -->
<tr>
  <td class="summary-label">{{t dashboard.services.hdfs.nodes.uptime}}</td>
  <td>{{view.nodeUptime}}</td>
</tr>
<!-- NameNode Heap -->
<tr>
  <td class="summary-label">{{t dashboard.services.hdfs.nodes.heap}}</td>
  <td>{{view.nodeHeap}}</td>
</tr>
<!-- HDFS Capacity (Disk Usage)-->
<tr>
  <td class="summary-label">{{t dashboard.services.hdfs.capacity.dfsUsed}}</td>
  <td>{{view.dfsUsedDisk}}</td>
</tr>
<tr>
  <td class="summary-label">{{t dashboard.services.hdfs.capacity.nonDfsUsed}}</td>
  <td>{{view.nonDfsUsedDisk}}</td>
</tr>

<!-- Divider-- make the remaining summary info on 2nd table-->
    </tbody>
  </table>
</div>
<div class="span6">
  <table class="summary-info table no-borders table-condensed">
    <tbody>

    <tr>
      <td class="summary-label">{{t dashboard.services.hdfs.capacity.remaining}}</td>
      <td>{{view.remainingDisk}}</td>
    </tr>
    <!-- Blocks Total -->
    <tr>
      <td class="summary-label">{{t services.service.summary.blocksTotal}}</td>
      <td>{{view.dfsTotalBlocks}}</td>
    </tr>
    <!-- Block Errors -->
    <tr>
      <td class="summary-label">{{t services.service.summary.blockErrors}}</td>
      <td>
        {{view.blockErrorsMessage}}
      </td>
    </tr>
    <!-- Total Files And Directories -->
    <tr>
      <td class="summary-label">{{t dashboard.services.hdfs.totalFilesAndDirs}}</td>
      <td>{{view.dfsTotalFiles}}</td>
    </tr>
    <!-- Upgrade Status -->
    <tr>
      <td class="summary-label">{{t services.service.summary.pendingUpgradeStatus}}</td>
      <td>
        <span {{bindAttr class="view.isUpgradeStatusWarning:upgrade-status-warning"}}>{{view.upgradeStatus}}</span>
      </td>
    </tr>
    <!-- Safe Mode Status -->
    <tr>
      <td class="summary-label">{{t services.service.summary.safeModeStatus}}</td>
      <td>
        {{view.safeModeStatus}}
      </td>
    </tr>